<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB R2018b"><title>Untitled</title><style type="text/css">.rtcContent { padding: 30px; } .CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S0 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S1 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S2 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S5 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S6 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234001159668px;  }
.S7 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.variableValue { width: 100% !important; }
.embeddedOutputsMatrixElement,.eoOutputWrapper .matrixElement {min-height: 18px; box-sizing: border-box;}
.embeddedOutputsMatrixElement .matrixElement,.eoOutputWrapper .matrixElement,.rtcDataTipElement .matrixElement {position: relative;}
.matrixElement .variableValue,.rtcDataTipElement .matrixElement .variableValue {white-space: pre; display: inline-block; vertical-align: top; overflow: hidden;}
.embeddedOutputsMatrixElement.inlineElement {}
.embeddedOutputsMatrixElement.inlineElement .topHeaderWrapper {display: none;}
.embeddedOutputsMatrixElement.inlineElement .veTable .body {padding-top: 0 !important; max-height: 100px;}
.inlineElement .matrixElement {max-height: 300px;}
.embeddedOutputsMatrixElement.rightPaneElement {}
.rightPaneElement .matrixElement,.rtcDataTipElement .matrixElement {overflow: hidden; padding-left: 9px;}
.rightPaneElement .matrixElement {margin-bottom: -1px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer,.eoOutputWrapper .matrixElement .valueContainer,.rtcDataTipElement .matrixElement .valueContainer {white-space: nowrap; margin-bottom: 3px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis.hide,.embeddedOutputsMatrixElement .matrixElement .verticalEllipsis.hide,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis.hide,.eoOutputWrapper .matrixElement .verticalEllipsis.hide,.rtcDataTipElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtcDataTipElement .matrixElement .verticalEllipsis.hide {display: none;}
.embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .verticalEllipsis, .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .horizontalEllipsis {display:none;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis {margin-bottom: -3px;}
.eoOutputWrapper .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer {cursor: default !important;}
.embeddedOutputsVariableElement {white-space: pre-wrap; word-wrap: break-word; min-height: 18px; max-height: 250px; overflow: auto;}
.variableElement {}
.embeddedOutputsVariableElement.inlineElement {}
.inlineElement .variableElement {}
.embeddedOutputsVariableElement.rightPaneElement {min-height: 16px;}
.rightPaneElement .variableElement {padding-top: 2px; padding-left: 9px;}
.variableNameElement {margin-bottom: 3px; display: inline-block;}
.matrixElement .horizontalEllipsis,.rtcDataTipElement .matrixElement .horizontalEllipsis {display: inline-block; margin-top: 3px; width: 30px; height: 12px; background-repeat: no-repeat; background-image: url("");}
.matrixElement .verticalEllipsis,.textElement .verticalEllipsis,.rtcDataTipElement .matrixElement .verticalEllipsis,.rtcDataTipElement .textElement .verticalEllipsis {margin-left: 35px; width: 12px; height: 30px; background-repeat: no-repeat; background-image: url("");}
.S9 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S10 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }</style></head><body><div class = rtcContent><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'><span style="white-space: pre;"><span>clear </span><span class="warning_squiggle_rte" style="color: rgb(160, 32, 240);">all</span><span>; close </span><span style="color: rgb(160, 32, 240);">all</span><span>;</span></span></div></div></div><div  class = 'S1'><span>Correction of Example 2 using SYMBOLIC COMPUTING just to be close from the correction. OF COURSE DO NOT USE IN FEA, E A L will have values !!!</span></div><div  class = 'S2'><img src = "" width = "442" height = "215" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">E A L real</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>alpha=E*A/L</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="FEDEA36E" data-testid="output_0" data-width="850" data-height="63" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">alpha =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="26" height="35"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>k=alpha*[1 -1;-1 1]</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="92DD1B6A" data-testid="output_1" data-width="850" data-height="103" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">k =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -32px;"><img src="" width="112.5" height="75"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%2 orientations 45;135°</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%can also use symbolic here</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%theta1 = sym([pi/4])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>theta1=pi/4;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>l1=cos(theta1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>m1=sin(theta1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>theta2=3*pi/4;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>l2=cos(theta2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>m2=sin(theta2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%augmented problem</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T_tilde1=[l1 m1;-m1 l1];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T1=zeros(4,4);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T1(1:2,1:2)=T_tilde1;</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>T1(3:4,3:4)=T_tilde1</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement" uid="40516F78" data-testid="output_2" data-width="850" style="width: 880px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="matrixElement veSpecifier" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="veVariableName variableNameElement double" style="width: 850px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">T1 = </span><span class="veVariableValueSummary veMetaSummary" style="white-space: normal; font-style: normal; color: rgb(179, 179, 179); font-size: 12px;">4×4</span></div><div class="valueContainer" data-layout="{&quot;columnWidth&quot;:73,&quot;totalColumns&quot;:4,&quot;totalRows&quot;:4,&quot;charsPerColumn&quot;:10}" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="variableValue" style="width: 294px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    0.7071    0.7071         0         0
   -0.7071    0.7071         0         0
         0         0    0.7071    0.7071
         0         0   -0.7071    0.7071
</div><div class="horizontalEllipsis hide" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"></div><div class="verticalEllipsis hide" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"></div></div></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T_tilde2=[l2 m2;-m2 l2];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T2=zeros(4,4);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>T2(1:2,1:2)=T_tilde2;</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>T2(3:4,3:4)=T_tilde2</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement" uid="8864D2FA" data-testid="output_3" data-width="850" style="width: 880px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="matrixElement veSpecifier" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="veVariableName variableNameElement double" style="width: 850px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">T2 = </span><span class="veVariableValueSummary veMetaSummary" style="white-space: normal; font-style: normal; color: rgb(179, 179, 179); font-size: 12px;">4×4</span></div><div class="valueContainer" data-layout="{&quot;columnWidth&quot;:73,&quot;totalColumns&quot;:4,&quot;totalRows&quot;:4,&quot;charsPerColumn&quot;:10}" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="variableValue" style="width: 294px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">   -0.7071    0.7071         0         0
   -0.7071   -0.7071         0         0
         0         0   -0.7071    0.7071
         0         0   -0.7071   -0.7071
</div><div class="horizontalEllipsis hide" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"></div><div class="verticalEllipsis hide" style="white-space: nowrap; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"></div></div></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%syms k_prime</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>k_prime=sym(zeros(4,4));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>k_prime(1,1)=k(1,1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>k_prime(1,3)=k(1,2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>k_prime(3,1)=k(2,1);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>k_prime(3,3)=k(2,2)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="F9637FAF" data-testid="output_4" data-width="850" data-height="145" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">k_prime =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -53px;"><img src="" width="151.5" height="117"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>k1=T1'*k_prime*T1</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="33AF4222" data-testid="output_5" data-width="850" data-height="223" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">k1 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -92px;"><img src="" width="156" height="195"></span></span></div></div></div></div></div><div  class = 'S1'><img src = "" width = "266" height = "127" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S9'><span style="white-space: pre;"><span>k2=T2'*k_prime*T2</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="BE3DD7F8" data-testid="output_6" data-width="850" data-height="223" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">k2 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -92px;"><img src="" width="156" height="195"></span></span></div></div></div></div></div><div  class = 'S1'><img src = "" width = "303" height = "141" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%assembly</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>K=sym(zeros(6,6));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>K(1:4,1:4)=k1(1:4,1:4);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>K(3:6,3:6)=k2(1:4,1:4);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>K(3:4,3:4)= k1(3:4,3:4)+k2(1:2,1:2)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="A4DB1C92" data-testid="output_7" data-width="850" data-height="301" data-hashorizontaloverflow="false" style="width: 880px; max-height: 312px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">K =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -131px;"><img src="" width="226" height="273"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%DOF u2 v2</span></span></div></div><div class="inlineWrapper"><div  class = 'S10'></div></div></div><div  class = 'S1'><img src = "" width = "250" height = "187" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">P1 P2 real</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>f=[0 0 P1 P2 0 0]'</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="5FF76EC1" data-testid="output_8" data-width="850" data-height="157" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">f =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -59px;"><img src="" width="43" height="129"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%full problem</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>U_full=</span><span class="warning_squiggle_rte">inv</span><span>(K)*f</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="9BC746DD" data-testid="output_9" data-width="850" data-height="169" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">U_full =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -65px;"><img src="" width="108" height="141"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span>dof_condensed=</span><span class="warning_squiggle_rte">[</span><span>3:4];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%condensed</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>U_condensed=</span><span class="warning_squiggle_rte">inv</span><span>(K(dof_condensed,dof_condensed))*f(dof_condensed)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="9CD4D7D0" data-testid="output_10" data-width="850" data-height="109" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">U_condensed =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -35px;"><img src="" width="56" height="81"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%partionned</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%   Special case: ALL imposed displacements are zero </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">% (Ub = 0)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>freedofs=</span><span class="warning_squiggle_rte">[</span><span>3:4];</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>constraineddofs=[1:2 5:6];</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>Kaa=K(freedofs,freedofs)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="E318AABE" data-testid="output_11" data-width="850" data-height="103" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Kaa =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -32px;"><img src="" width="86.5" height="75"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>Kba=K(constraineddofs,freedofs)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="7B0C6318" data-testid="output_12" data-width="850" data-height="181" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Kba =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -71px;"><img src="" width="112.5" height="153"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>fa=f(freedofs)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="AD4249EE" data-testid="output_13" data-width="850" data-height="73" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">fa =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -17px;"><img src="" width="39.5" height="45"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>Ua=</span><span class="warning_squiggle_rte">inv</span><span>(Kaa)*fa</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="2B9C6C46" data-testid="output_14" data-width="850" data-height="109" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Ua =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -35px;"><img src="" width="56" height="81"></span></span></div></div></div></div></div><div  class = 'S1'><img src = "" width = "178" height = "85" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S9'><span style="white-space: pre;"><span>R=Kba*Ua</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="CD929A2E" data-testid="output_15" data-width="850" data-height="193" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">R =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -77px;"><img src="" width="87" height="165"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%on x</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>R(1)+R(3)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="08FD4895" data-testid="output_16" data-width="850" data-height="30" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><span class="embeddedOutputsVariableElement">ans =&nbsp;</span><span class="MathEquation inlineSymbolicElement" style="font-size: 15px;"><span style="vertical-align: -6px;"><img src="" width="27.5" height="20"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%on y</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>R(2)+R(4)</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="586454BA" data-testid="output_17" data-width="850" data-height="30" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><span class="embeddedOutputsVariableElement">ans =&nbsp;</span><span class="MathEquation inlineSymbolicElement" style="font-size: 15px;"><span style="vertical-align: -6px;"><img src="" width="27.5" height="20"></span></span></div></div></div></div></div><div  class = 'S1'><img src = "" width = "356" height = "96" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%check u with longitudinal disp</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">%dim 1*2*2*4*4*1 </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">l m real</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">ui vi uj vj real</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>U=[ui vi uj vj]'</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="EA562721" data-testid="output_18" data-width="850" data-height="109" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">U =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -35px;"><img src="" width="40.5" height="81"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>Tu=[l m 0 0; 0 0 l m]</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="186129A1" data-testid="output_19" data-width="850" data-height="67" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Tu =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -14px;"><img src="" width="98" height="39"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>B=(1/L)*[-1 1]</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="9DAD5C01" data-testid="output_20" data-width="850" data-height="64" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">B =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="65.5" height="36"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>S=E*B*Tu*U</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="B81B9742" data-testid="output_21" data-width="850" data-height="63" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">S =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="191.5" height="35"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">% dim 1*2*2*4</span></span></div></div><div class="inlineWrapper"><div  class = 'S10'></div></div></div><div  class = 'S1'><img src = "" width = "220" height = "110" alt = "" style = "vertical-align: baseline"></img></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: pre;"><span>T1u=[T1(1,:);T1(3,:)];</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>Sigma1=E*B*T1u*[ 0;0; Ua]</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="D2CDCD4D" data-testid="output_22" data-width="850" data-height="68" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Sigma1 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="99.5" height="40"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: pre;"><span>T2u=[T2(1,:);T2(3,:)];</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S5'><span style="white-space: pre;"><span>Sigma2=E*B*T2u*[ Ua ;0; 0]</span></span></div><div  class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="68E64C67" data-testid="output_23" data-width="850" data-height="68" data-hashorizontaloverflow="false" style="width: 880px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">Sigma2 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="99.5" height="40"></span></span></div></div></div></div></div><div  class = 'S1'><img src = "" width = "379" height = "225" alt = "" style = "vertical-align: baseline"></img></div></div><br>
<!-- 
##### SOURCE BEGIN #####
clear all; close all;
%% 
% Correction of Example 2 using SYMBOLIC COMPUTING just to be close from 
% the correction. OF COURSE DO NOT USE IN FEA, E A L will have values !!!
% 
% 

syms E A L real

alpha=E*A/L
k=alpha*[1 -1;-1 1]


%2 orientations 45;135°
%can also use symbolic here
%theta1 = sym([pi/4])
theta1=pi/4;
l1=cos(theta1);
m1=sin(theta1);
theta2=3*pi/4;
l2=cos(theta2);
m2=sin(theta2);

%augmented problem
T_tilde1=[l1 m1;-m1 l1];
T1=zeros(4,4);
T1(1:2,1:2)=T_tilde1;
T1(3:4,3:4)=T_tilde1

T_tilde2=[l2 m2;-m2 l2];
T2=zeros(4,4);
T2(1:2,1:2)=T_tilde2;
T2(3:4,3:4)=T_tilde2
%syms k_prime
k_prime=sym(zeros(4,4));
k_prime(1,1)=k(1,1);
k_prime(1,3)=k(1,2);
k_prime(3,1)=k(2,1);
k_prime(3,3)=k(2,2)

k1=T1'*k_prime*T1
%% 
% 

k2=T2'*k_prime*T2
%% 
% 


%assembly
K=sym(zeros(6,6));
K(1:4,1:4)=k1(1:4,1:4);
K(3:6,3:6)=k2(1:4,1:4);
K(3:4,3:4)= k1(3:4,3:4)+k2(1:2,1:2)

%DOF u2 v2

%% 
% 


syms P1 P2 real

f=[0 0 P1 P2 0 0]'
%full problem
U_full=inv(K)*f
dof_condensed=[3:4];
%condensed
U_condensed=inv(K(dof_condensed,dof_condensed))*f(dof_condensed)

%partionned
%   Special case: ALL imposed displacements are zero 
% (Ub = 0)

freedofs=[3:4];
constraineddofs=[1:2 5:6];
Kaa=K(freedofs,freedofs)
Kba=K(constraineddofs,freedofs)
fa=f(freedofs)
Ua=inv(Kaa)*fa
%% 
% 

R=Kba*Ua
%on x
R(1)+R(3)
%on y
R(2)+R(4)
%% 
% 

%check u with longitudinal disp
%dim 1*2*2*4*4*1 
syms l m real
syms ui vi uj vj real
U=[ui vi uj vj]'
Tu=[l m 0 0; 0 0 l m]
B=(1/L)*[-1 1]
S=E*B*Tu*U
% dim 1*2*2*4

%% 
% 

T1u=[T1(1,:);T1(3,:)];
Sigma1=E*B*T1u*[ 0;0; Ua]
T2u=[T2(1,:);T2(3,:)];
Sigma2=E*B*T2u*[ Ua ;0; 0]
%% 
%
##### SOURCE END #####
--></body></html>